package com.sample.dao.impl;

import java.util.List;

import com.sample.Utils;
import com.sample.dao.TimeEntryDAO;
import com.sample.model.TimeEntry;
import com.trg.search.ISearch;
import com.trg.search.SearchResult;

public class TimeEntryDAOImpl extends BaseGenericDAO<TimeEntry, Long> implements TimeEntryDAO {
	@Override
	public List<TimeEntry> search(ISearch search) {
		return super.search(Utils.replaceSortProperty(search, "project.fullName",
				"project.name"));
	}

	@Override
	public SearchResult<TimeEntry> searchAndCount(ISearch search) {
		return super.searchAndCount(Utils.replaceSortProperty(search, "project.fullName", "project.name"));
	}
}